package com.yiquan.video;

import com.yiquan.video.dao.VideoDao;
import com.yiquan.video.pojo.Video;
import com.yiquan.video.service.VideoService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import util.IdWorker;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.UUID;

@SpringBootTest
@RunWith(SpringRunner.class)
public class testSave {

    @Autowired
    private VideoService videoService;

    @Autowired
    private IdWorker idWorker;

    @Resource
    private VideoDao videoDao;

    @Test
    public void save(){

        Video video = new Video();
        video.setVideo_uid(353565485L);
        video.setVideo_id(784578277L);
        video.setThumbs(100);
        video.setVideo_status(1);
        video.setVideo_id(3565455L);
        video.setCollects(1000);
        video.setVideo_url( "https://bookpavilion.oss-cn-shenzhen.aliyuncs.com/yi_quan/2021/12/27/1475407529184989184.png");
        videoDao.save(video);
    }
    @Test
    public void test(){
        Long a = new Long(154845154L);
        System.out.println(a.toString());

    }
    @Test
    public void testFindAll(){
        Long a = 20l;
        String s = String.valueOf(a);
        String b = "sdwa";
        System.out.println(b+a);
    }


}
